home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Developer CD v2.1
/
Amiga Developer CD v2.1.iso
/
DevInfo
/
Intuition
/
Hints
next >
Wrap
Text File
|
1996-07-13
|
2KB
|
37 lines
$Id: Hints 1.2 1996/07/13 21:03:09 heinz Exp $
- Intuition deadlocks are usually caused by Layer lock
misunderstandings. Read the autodoc for LockLayer() very
carefully. Many Intuition functions also use Layer locking, e.g.
ObtainGIRPort(). Don't wait for Intuition or try any synchronous
Intuition interaction directly or indirectly while Layers are
locked.
- It is strongly discouraged to use so called "atomic
modifications" of structure fields like updating the
ReportMouse() setting WFLG_REPORTMOUSE or changing WFLG_RMBTRAP
on the fly. On future PowerPC machines, a single instruction
might no longer be atomic. So if there is a function to modify a
shared value, use it.
- There are some things in Intuition without proper Semaphore
protection. Just check the CloseWindow() autodoc for the
description of CloseWindowSafely(). Expect Forbid() type locking
to be replaced with proper semaphore locking in a PowerPC OS.
Isolate those places in the code that you want to use on a
PowerPC OS to make changes easier.
- Don't play stunts with the borders. Adding gadgets to any border
has always been fairly tricky because the window metric couldn't
be fully obtained without hacking into things. Expect this to
change and expect a need for calling a function to obtain
information about sizes in a future OS. The GUI will change.
- Expect GUI changes. If at all possible, don't use assumptions and
hardcoded sizes for UI elements.
Heinz Wrobel
<heinz@amiga.de>